package rest

import (
	"io"
	"net/http"
	"net/url"
	"sync"

	"gitee.com/hexug/go-chain-restful-client/common/logger"
)

func NewResponse(c *Client) *Response {
	return &Response{
		log:        c.log,
		statusCode: 0,
	}
}

type Response struct {
	body        io.ReadCloser
	headers     http.Header
	statusCode  int
	status      string
	err         error
	bf          []byte
	contentType string
	isRead      bool
	url         *url.URL
	cookies     []*http.Cookie

	log  *logger.Log
	lock sync.Mutex
}
